import request from '@/utils/request'
const api_name='/eduservice/indexfront'

export default {
  getList() {
    return request({
      url: `${api_name}/index`,
      method: 'get'
    })
  },
  //热搜榜
  getHotSearch() {
    return request({
      url:`${api_name}/queryTopSearchHotWord`,
      method: 'get'
    })
  },
  //搜索
  searchByKeyWord(page, limit, keyword) {
    return request({
      url: `${api_name}/searchByKeyWord/${page}/${limit}/${keyword}`,
      method: 'get',
    })
  },
  getMsgCount(){
    return request({
      url:`${api_name}/msgCount`,
      method:'get'
    })
  },
  getMsg(){
    return request({
      url:`${api_name}/msg`,
      method:'get'
    })
  },
  //消息已读
  doRead(){
    return request({
      url:`${api_name}/doRead`,
      method:'get'
    })
  },
  doChat(chat){
    return request({
      url:`${api_name}/doChat`,
      method:'post',
      data: chat
    })
  }
}
